package com.xuzhen.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

/**
 * 测试标签类中方法的调用顺序
 * 
 * @author xuzhen
 * 
 */
public class InvokeOrderTag extends TagSupport {
	private String keyOne;
	private String keyTwo;

	
	@Override
	public int doEndTag() throws JspException {
		System.out.println("doEndTag");
		return super.doEndTag();
	}

	@Override
	public int doStartTag() throws JspException {
		System.out.println("doStartTag");
		return super.doStartTag();
	}

	@Override
	public void setPageContext(PageContext pageContext) {
		System.out.println("setPageContext");
		super.setPageContext(pageContext);
	}

	@Override
	public void setParent(Tag t) {
		System.out.println("setParent");
		super.setParent(t);
	}

	public void setKeyOne(String keyOne) {
		System.out.println("keyOne");
		this.keyOne = keyOne;
	}

	public void setKeyTwo(String keyTwo) {
		System.out.println("keyTwo");
		this.keyTwo = keyTwo;
	}

}
